﻿@model ECatalog.Models.Kits.KitViewModel
<div class="modal fade" id="addModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            @using (@Html.BeginForm("SaveModelKit", "Kit", null, FormMethod.Post))
            {
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title">Добавление модели к комплекту</h4>
                </div>
                <div class="modal-body">
                    @Html.HiddenFor(k => k.KitId)
                    @foreach (var model in Model.SelectModels)
                    {
                        Html.RenderPartial("ModelItem", model);
                    }
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-primary">Сохранить</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button>
                </div>
            }
        </div>
    </div>
</div>
